﻿@model Eqwww.Domain.Models.Identity.RoleModel

@{
    ViewData["Title"] = "Details";
    Layout = "~/Views/Shared/_ManageFormLayout.cshtml";
}

<div class="mdui-container">
    <div class="mdui-row">
        <div class="mdui-col-xs-12 mdui-col-md-6">
            <div class="mdui-card mdui-m-t-1" style="border-radius:5px;">
                <div class="mdui-card-content">
                    <div class="mdui-typo-title">基本信息</div>
                    <div class="mdui-list">
                        <div class="mdui-list-item mdui-ripple">
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.ShowName)
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.ShowName)
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    编码
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.Name)
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    识别码
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.NormalizedName)
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.IsSystem)
                                </div>
                                <div class="mdui-list-item-title">
                                    @if (Model.IsSystem == true)
                                    {
                                        <text>是</text>
                                    }
                                    else
                                    {
                                        <text>否</text>
                                    }
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.SortCode)
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.SortCode)
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.Description)
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.Description)
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
                
            </div>
            
            <div class="mdui-card mdui-m-t-1" style="border-radius:5px;">
                <div class="mdui-card-content">
                    <div class="mdui-typo-title">关联策略</div>
                    <div class="mdui-list">
                        @{
                            var relatedStrategorys = ViewBag.Strategorys as List<Eqwww.Domain.Models.SystemManage.StrategoryModel>;
                        }
                        @if (relatedStrategorys.Count() <= 0)
                        {
                            <div class="mdui-list-item mdui-ripple">
                                <div class="mdui-list-item-content">
                                    <div class="mdui-list-item-title">
                                        <span class="mdui-text-color-theme-accent">当前角色未关联任何策略</span>
                                    </div>
                                </div>
                            </div>
                        }
                        else
                        {
                            foreach (var item in relatedStrategorys)
                            {
                                <div class="mdui-list-item mdui-ripple">
                                    <div class="mdui-list-item-content">
                                        <div class="mdui-list-item-title">
                                            @item.Name
                                        </div>
                                        @if (!string.IsNullOrEmpty(item.Description))
                                        {
                                            <div class="mdui-list-item-text">
                                                @item.Description
                                            </div>
                                        }

                                    </div>
                                </div>
                            }
                        }
                    </div>
                </div>
            </div>

            
        </div>
        <div class="mdui-col-xs-12 mdui-col-md-6">
            <div class="mdui-card mdui-m-t-1" style="border-radius:5px;">
                <div class="mdui-card-content">
                    <div class="mdui-typo-title">维护历史</div>
                    <div class="mdui-list">
                        <div class="mdui-list-item mdui-ripple">
                            <i class="mdui-list-item-icon mdui-icon material-icons">account_circle</i>
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.CreateUserId)
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.CreateUser.RealName)
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <i class="mdui-list-item-icon mdui-icon material-icons">access_time</i>
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.CreateTime)
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.CreateTime)
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <i class="mdui-list-item-icon mdui-icon material-icons">account_circle</i>
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.LastUpdateUserId)
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.LastUpdateUser.RealName)
                                </div>
                            </div>
                        </div>

                        <div class="mdui-list-item mdui-ripple">
                            <i class="mdui-list-item-icon mdui-icon material-icons">access_time</i>
                            <div class="mdui-list-item-content">
                                <div class="mdui-list-item-text">
                                    @Html.DisplayNameFor(model => model.LastUpdateTime)
                                </div>
                                <div class="mdui-list-item-title">
                                    @Html.DisplayFor(model => model.LastUpdateTime)
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

